import request from '@/utils/request';

export async function invoiceAllListServer(data) {
  return request({
    url: '/einvoice/app/einvoice/einvoiceList',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    data: data,
    method: 'POST',
  });
}
export async function invoiceListServer(data) {
  return request({
    url: '/einvoice/app/einvoiceTitle/selectEinvoiceTitleList',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    data: data,
    method: 'POST',
  });
}
export async function invoiceAddServer(data) {
  return request({
    url: '/einvoice/app/einvoiceTitle/createEInvoiceTitle',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    data: data,
    method: 'POST',
  });
}
export async function invoiceEditServer(data) {
  return request({
    url: '/einvoice/app/einvoiceTitle/updateEInvoiceTitle',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    data: data,
    method: 'POST',
  });
}
export async function invoiceSendEmailServer(data) {
  return request({
    url: '/einvoice/app/einvoice/sendEInvoiceMail',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    data: data,
    method: 'POST',
  });
}
export async function seletEinvoiceDetailServer(data) {
  return request({
    url: `/einvoice/app/einvoice/seletEinvoiceDetail?id=${data}`,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'GET',
    data: {},
  });
}
